import request from '@/utils/request'

// 查询请假记录列表
export function listRegisterLeave(query) {
  return request({
    url: '/business/registerLeave/list',
    method: 'get',
    params: query
  })
}

// 查询请假记录所有列表
export function listAllRegisterLeave(query) {
  return request({
    url: '/business/registerLeave/listAll',
    method: 'get',
    params: query
  })
}

// 查询请假记录详细
export function getRegisterLeave(id) {
  return request({
    url: '/business/registerLeave/getInfo/' + id,
    method: 'get'
  })
}

// 新增请假记录
export function addRegisterLeave(data) {
  return request({
    url: '/business/registerLeave/add',
    method: 'post',
    data: data
  })
}

// 修改请假记录
export function updateRegisterLeave(data) {
  return request({
    url: '/business/registerLeave/edit',
    method: 'post',
    data: data
  })
}

// 删除请假记录
export function delRegisterLeave(id) {
  return request({
    url: '/business/registerLeave/remove/' + id,
    method: 'get'
  })
}
